﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User.Master" AutoEventWireup="true"
	CodeBehind="CreateEvent.aspx.cs" Inherits="Event_SG_EWDT.CreateEvent" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Userhead" runat="server">
   <title>Create Event</title>
   	<link href="Scripts/jquery.toastmessage.css" rel="stylesheet" type="text/css" />
	<script src="Scripts/jquery.toastmessage.js" type="text/javascript"></script>

    <style type="text/css">
	  .rbtn label {  margin-right:30px; }  
	</style>

	<style type="text/css">
		#div_left
		{
			width: 400px;
			height: 316px;
		}
		.style6
		{
			width: 100%;
		}
		.style8
		{
			width: 333px;
		}
		.style9
		{
			width: 111px;
		}
		.style10
		{
			width: 188px;
		}
		/*.style20
		{
			width: 96px;
		}
		.style21
		{
            width: 94px;
        }
		.style22
		{
			width: 139px;
		}*/
	</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="newHolder" runat="server">
    <p class="h1">
		&nbsp;&nbsp;
		Create Event<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
		</asp:ToolkitScriptManager>
</p>
	<div 
		class="div_main">
		<br />
		<table class="style6">
			<tr>
				<td class="style10">
		<asp:Label ID="lblCreateTitle" runat="server" CssClass="lbl_field" Text="Title"></asp:Label>
				</td>
				<td class="style8" colspan="3">
		<asp:TextBox ID="tbxCreateTitle" runat="server" CssClass="tbx_field"></asp:TextBox>
				</td>
				<td class="style8">
		            <asp:RequiredFieldValidator ID="rfvTitle" runat="server" 
                        ControlToValidate="tbxCreateTitle" Display="Dynamic" 
                        ErrorMessage="Title Required" ValidationGroup="ce"></asp:RequiredFieldValidator>
                </td>
			</tr>
			<tr>
				<td class="style10">
		<asp:Label ID="lblCreateDesc" runat="server" CssClass="lbl_field" 
			Text="Description"></asp:Label>
				</td>
				<td class="style8" colspan="3">
		<asp:TextBox ID="tbxCreateDesc" runat="server" CssClass="tbx_field_multi" 
			TextMode="MultiLine"></asp:TextBox>
				</td>
				<td class="style8">
		            <asp:RequiredFieldValidator ID="rfvDesc" runat="server" 
                        ControlToValidate="tbxCreateDesc" Display="Dynamic" 
                        ErrorMessage="Description Required" ValidationGroup="ce"></asp:RequiredFieldValidator>
                </td>
			</tr>
			<tr>
				<td class="style10">
		<asp:Label ID="lblCreateSdate" runat="server" CssClass="lbl_field" 
			Text="Start Date"></asp:Label>
				</td>
				<td class="style8" colspan="3">
		<asp:TextBox ID="tbxCreateSdate" runat="server" CssClass="tbx_field"></asp:TextBox>
		<asp:CalendarExtender ID="tbxCreateSdate_CalendarExtender" runat="server" 
			Enabled="True" TargetControlID="tbxCreateSdate" Format="yyyy/MM/dd">
		</asp:CalendarExtender>
				</td>
				<td class="style8">
		            <asp:RequiredFieldValidator ID="rfvStartDate" runat="server" 
                        ControlToValidate="tbxCreateSdate" Display="Dynamic" 
                        ErrorMessage="Date Required" ValidationGroup="ce"></asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="rvStartDate" runat="server" 
                        ControlToValidate="tbxCreateSdate" ErrorMessage="Invalid Date" Type="Date" 
                        Display="Dynamic" ValidationGroup="ce"></asp:RangeValidator>
                </td>
			</tr>
			<tr>
				<td class="style10">
		<asp:Label ID="lblCreateStime" runat="server" CssClass="lbl_field" 
			Text="Start Time"></asp:Label>
				</td>
				<td class="style21">

				<asp:TextBox ID="tbxSHour" runat="server" Height="23px" Width="53px" 
						CssClass="tbx_field_time"></asp:TextBox>
					<ajaxtoolkit:numericupdownextender ID="tbxSHour_NumericUpDownExtender" 
						runat="server" Enabled="True" Maximum="12"
				Minimum="1" RefValues="" ServiceDownMethod="" ServiceDownPath="" ServiceUpMethod=""
				Tag="" TargetButtonDownID="" TargetButtonUpID="" TargetControlID="tbxSHour" 
						Width="53">
			</ajaxtoolkit:numericupdownextender>
					</td>
				<td class="style20">

					<asp:TextBox ID="tbxSMinute" runat="server" Height="23px" Width="53px" 
						CssClass="tbx_field_time"></asp:TextBox>
			<ajaxtoolkit:numericupdownextender ID="tbxSMinute_NumericUpDownExtender" runat="server"
				Enabled="True" Maximum="59" Minimum="00" 
						RefValues="00;01;02;03;04;05;06;07;08;09;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30;31;32;33;34;35;36;37;38;39;40;41;42;43;44;45;46;47;48;49;50;51;52;53;54;55;56;57;58;59" 
						ServiceDownMethod="" ServiceDownPath=""
				ServiceUpMethod="" Tag="" TargetButtonDownID="" TargetButtonUpID="" TargetControlID="tbxSMinute"
				Width="53">
			</ajaxtoolkit:numericupdownextender>

					</td>
				<td class="style22">

			<asp:TextBox ID="tbxSAMPM" runat="server" Height="23px" Width="53px" 
						CssClass="tbx_field_time"></asp:TextBox>
			<ajaxtoolkit:numericupdownextender ID="tbxSAMPM_NumericUpDownExtender" runat="server"
				Enabled="True" RefValues="AM;PM" ServiceDownMethod="" ServiceDownPath="" ServiceUpMethod=""
				Tag="" TargetButtonDownID="" TargetButtonUpID="" TargetControlID="tbxSAMPM" 
						Width="53">
			</ajaxtoolkit:numericupdownextender>
					
					</td>
				<td class="style22">

			        &nbsp;</td>
			</tr>
			<tr>
				<td class="style10">
		<asp:Label ID="lblCreateEdate" runat="server" CssClass="lbl_field" 
			Text="End Date"></asp:Label>
				</td>
				<td class="style8" colspan="3">
		<asp:TextBox ID="tbxCreateEdate" runat="server" CssClass="tbx_field"></asp:TextBox>
		<asp:CalendarExtender ID="tbxCreateEdate_CalendarExtender" runat="server" 
			Enabled="True" TargetControlID="tbxCreateEdate"  
                        Format="yyyy/MM/dd">
		</asp:CalendarExtender>
				</td>
				<td class="style8">
		            <asp:RequiredFieldValidator ID="rfvEndDate" runat="server" 
                        ControlToValidate="tbxCreateEdate" Display="Dynamic" 
                        ErrorMessage="Date Required" ValidationGroup="ce"></asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="rvEndDate" runat="server" 
                        ControlToValidate="tbxCreateEdate" Display="Dynamic" 
                        ErrorMessage="Invalid Date" Type="Date" ValidationGroup="ce"></asp:RangeValidator>
                </td>
			</tr>
			<tr>
				<td class="style10">
		<asp:Label ID="lblCreateEtime" runat="server" CssClass="lbl_field" 
			Text="End Time"></asp:Label>
				</td>
				<td class="style21">

				<asp:TextBox ID="tbxEHour" runat="server" Height="23px" Width="53px" 
						CssClass="tbx_field_time"></asp:TextBox>
					<ajaxtoolkit:numericupdownextender ID="tbxEHour_NumericUpDownExtender" 
						runat="server" Enabled="True" Maximum="12"
				Minimum="1" RefValues="" ServiceDownMethod="" ServiceDownPath="" ServiceUpMethod=""
				Tag="" TargetButtonDownID="" TargetButtonUpID="" TargetControlID="tbxEHour" 
						Width="53">
			</ajaxtoolkit:numericupdownextender>
				</td>
				<td class="style20">

					<asp:TextBox ID="tbxEMinute" runat="server" Height="23px" Width="53px" 
						CssClass="tbx_field_time"></asp:TextBox>
			<ajaxtoolkit:numericupdownextender ID="tbxEMinute_NumericUpDownExtender" runat="server"
				Enabled="True" Maximum="59" Minimum="00" 
						RefValues="00;01;02;03;04;05;06;07;08;09;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30;31;32;33;34;35;36;37;38;39;40;41;42;43;44;45;46;47;48;49;50;51;52;53;54;55;56;57;58;59" 
						ServiceDownMethod="" ServiceDownPath=""
				ServiceUpMethod="" Tag="" TargetButtonDownID="" TargetButtonUpID="" TargetControlID="tbxEMinute"
				Width="53">
			</ajaxtoolkit:numericupdownextender>

				</td>
				<td class="style22">

			<asp:TextBox ID="tbxEAMPM" runat="server" Height="23px" Width="53px" 
						CssClass="tbx_field_time"></asp:TextBox>
			<ajaxtoolkit:numericupdownextender ID="tbxEAMPM_NumericUpDownExtender" runat="server"
				Enabled="True" RefValues="AM;PM" ServiceDownMethod="" ServiceDownPath="" ServiceUpMethod=""
				Tag="" TargetButtonDownID="" TargetButtonUpID="" TargetControlID="tbxEAMPM" 
						Width="53">
			</ajaxtoolkit:numericupdownextender>
					
				</td>
				<td class="style22">

			        <asp:Label ID="lblEndTime" runat="server" ForeColor="Red"></asp:Label>
                </td>
			</tr>
			<tr>
				<td class="style10">
		<asp:Label ID="lblCreateFee" runat="server" CssClass="lbl_field" 
			Text="Admission Fee"></asp:Label>
				</td>
				<td class="style8" colspan="3">
		<asp:TextBox ID="tbxCreateFee" runat="server" CssClass="tbx_field"></asp:TextBox>
				</td>
				<td class="style8">
		            <asp:RequiredFieldValidator ID="rfvFee" runat="server" 
                        ControlToValidate="tbxCreateFee" Display="Dynamic" 
                        ErrorMessage="Fee Required. If Free Put 0." ValidationGroup="ce"></asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="rvFee" runat="server" ControlToValidate="tbxCreateFee" 
                        Display="Dynamic" ErrorMessage="Invalid Number" MaximumValue="10000000000" 
                        MinimumValue="0" Type="Double" ValidationGroup="ce"></asp:RangeValidator>
                </td>
			</tr>
			<tr>
				<td class="style10">
		<asp:Label ID="lblCreateLocation" runat="server" CssClass="lbl_field" 
			Text="Location"></asp:Label>
				</td>
				<td class="style8" colspan="3">
		<asp:TextBox ID="tbxCreateLocation" runat="server" CssClass="tbx_field"></asp:TextBox>
				</td>
				<td class="style8">
		            <asp:RequiredFieldValidator ID="rfvLocation" runat="server" 
                        ControlToValidate="tbxCreateLocation" ErrorMessage="Location Required" 
                        ValidationGroup="ce"></asp:RequiredFieldValidator>
                </td>
			</tr>
			<tr>
				<td class="style10">
		<asp:Label ID="lblCreatePrivacy" runat="server" CssClass="lbl_field" 
			Text="Privacy"></asp:Label>
				</td>
				<td class="style8" colspan="3">
		<asp:RadioButtonList ID="rdblCreatePrivacy" RepeatDirection="Horizontal" 
			RepeatLayout="Flow" RepeatColumns="3"
			runat="server" CssClass="rbtn" Width="307px">
			<asp:ListItem>Public</asp:ListItem>
			<asp:ListItem>Private</asp:ListItem>
			<asp:ListItem>Secret</asp:ListItem>
		</asp:RadioButtonList>
				</td>
				<td class="style8">
		            <asp:RequiredFieldValidator ID="rfvPrivacy" runat="server" 
                        ControlToValidate="rdblCreatePrivacy" Display="Dynamic" 
                        ErrorMessage="Privacy Required" ValidationGroup="ce"></asp:RequiredFieldValidator>
                </td>
			</tr>
			<tr>
				<td class="style10">
		<asp:Label ID="lblCreateCategory" runat="server" CssClass="lbl_field" 
			Text="Category"></asp:Label>
				</td>
				<td class="style8" colspan="3">
		<asp:DropDownList ID="ddlCreateCat" runat="server" CssClass="tbx_field" 
                        DataSourceID="CategoryObjectSource" DataTextField="CategoryName" 
                        DataValueField="CategoryId">
		</asp:DropDownList>
				</td>
				<td class="style8">
		            <asp:RequiredFieldValidator ID="rfvCategory" runat="server" 
                        ControlToValidate="ddlCreateCat" Display="Dynamic" 
                        ErrorMessage="Category Required" ValidationGroup="ce"></asp:RequiredFieldValidator>
                </td>
			</tr>
			<tr>
				<td class="style10">
		<asp:Label ID="lblCreateThumbnail" runat="server" CssClass="lbl_field" 
			Text="Event Thumbnail"></asp:Label>
				</td>
				<td class="style8" colspan="3">
		<asp:FileUpload ID="fuCreateThumbnail" runat="server" CssClass="tbx_field" />
				</td>
				<td class="style8">
                    <asp:RegularExpressionValidator ID="revThumbnail" runat="server" 
                        ControlToValidate="fuCreateThumbnail" Display="Dynamic" 
                        ErrorMessage="Invalid Image File Format" 
                        ValidationExpression=".+[.](jpg|png|gif|bmp|jpeg|JPG|PNG|GIF|BMP|JPEG)$" 
                        ValidationGroup="ce"></asp:RegularExpressionValidator>
                </td>
			</tr>
			<tr>
				<td class="style10">
		<asp:Label ID="lblCreatePoster" runat="server" CssClass="lbl_field" 
			Text="Event Poster"></asp:Label>
				</td>
				<td class="style8" colspan="3">
		<asp:FileUpload ID="fuCreatePoster" runat="server" CssClass="tbx_field" />
				</td>
				<td class="style8">
                    <asp:RegularExpressionValidator ID="revPoster" runat="server" 
                        ControlToValidate="fuCreatePoster" Display="Dynamic" 
                        ErrorMessage="Invalid Image File Format" 
                        ValidationExpression=".+[.](jpg|png|gif|bmp|jpeg|JPG|PNG|GIF|BMP|JPEG)$" 
                        ValidationGroup="ce"></asp:RegularExpressionValidator>
                </td>
			</tr>
			<tr>
				<td class="style10">
					&nbsp;</td>
				<td class="style8" colspan="3">
		<asp:Button ID="btnCreateEvent" runat="server" CssClass="btnCreateEvent" 
			Text="Create!" onclick="btnCreateEvent_Click" ValidationGroup="ce" />
				</td>
				<td class="style8">
		            &nbsp;</td>
			</tr>
			<tr>
				<td class="style10">
					<asp:ObjectDataSource ID="CategoryObjectSource" runat="server" 
                        SelectMethod="RetrieveCategory" TypeName="Event_SG_EWDT.DBMANAGER">
                    </asp:ObjectDataSource>
                </td>
				<td class="style8" colspan="3">
					&nbsp;</td>
				<td class="style8">
					&nbsp;</td>
				<td class="style9">
					&nbsp;</td>
				<td>
					&nbsp;</td>
			</tr>
		</table>
	</div>
	<br />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderUser" runat="server">
</asp:Content>
